package com;

import javax.swing.*;
import java.awt.*;

public class GameWin extends JFrame {
    int wigth= 2*GameUntil.OFFSET+GameUntil.MAP_W*GameUntil.SQUARE_LENGTH;
    int height=2*GameUntil.OFFSET+GameUntil.MAP_H*GameUntil.SQUARE_LENGTH;
   void launch(){
       MapBottom mapBottom =new MapBottom();
       this.setVisible(true);
       this.setSize(wigth,height);
       this.setLocationRelativeTo(null);
       this.setTitle("扫雷");
       this.setDefaultCloseOperation(EXIT_ON_CLOSE);
       while(true){
           repaint();
           try {
               Thread.sleep(10);
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
       }
   }

    @Override
    public void paint(Graphics g) {
        MapBottom mapBottom = new MapBottom();
        mapBottom.paintSelf(g);


    }

    public static void main (String[] args){
       GameWin gameWin =new GameWin();
       gameWin.launch();

}
}
